#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main(void)
{
	double ch[8]{}, cr[8]{}, j = 0;
	int i = 0;
	for (i = 0; i <= 7; i++)
	{
		scanf("%lf", &ch[i]);
		j += ch[i];
		cr[i] = j;
	}
	for (i = 0; i <= 7; i++)
		printf("%-6.2lf", ch[i]);
	printf("\n");
	for (i = 0; i <= 7; i++)
		printf("%-6.2lf", cr[i]);

	return 0;
}